<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateFriendlyLinkTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('friendly_link', function (Blueprint $table) {
            $table->engine = 'innodb';
            $table->increments('id')->unsigned();
            $table->string('title', 64)->default('')->comment('链接标题');
            $table->string('url', 255)->default('')->comment('链接地址');
            $table->unsignedTinyInteger('sort')->default(0)->comment('排序');
            $table->unsignedTinyInteger('is_show')->default(0)->comment('是否显示前台:1-是,0-否');
            $table->unsignedInteger('created_at')->default(0);
            $table->unsignedInteger('updated_at')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('friendly_link');
    }
}
